#ifndef PLAYVIDEOWIDGET_H
#define PLAYVIDEOWIDGET_H

#include <QWidget>
#include "hwddecodethread.h"

namespace Ui {
class PlayVideoWidget;
}

class PlayVideoWidget : public QWidget
{
    Q_OBJECT

public:
    explicit PlayVideoWidget(QWidget *parent = nullptr);
    ~PlayVideoWidget();

    void set_url(QString url);
    void play();
    void stop();

protected:
    void paintEvent(QPaintEvent *);

private slots:
    void slot_receive_image(const QImage &rImg);

private:
    Ui::PlayVideoWidget *ui;
    HwdDecodeThread *mDecodeThread;
    QImage img;
};

#endif // PLAYVIDEOWIDGET_H
